﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AndrysNet.HiUpdateTools_Addin.Core;

namespace HiUpdateTools.Client.Win
{
    public partial class ErrorForm : Form
    {
        public Exception Error { get; set; }

        public ErrorForm()
        {
            InitializeComponent();
        }

        private void ErrorForm_Load(object sender, EventArgs e)
        {

            meErrorMesage.Text = Error.Message;
            meStackTrace.Text = Error.StackTrace;

        }

        private void btOk_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btSendErrorInfo_Click(object sender, EventArgs e)
        {
            new MAPI(this.Handle, null, "HiUpdateTools - Update error report", meErrorMesage.Text + "\r\n" + meStackTrace.Text, "Josef Andrys", "josef.andrys@gmail.com");
        }

    }
}
